package com.zb.spring5.aop;

import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;

/**
 * APO 方法拦截通知  代理
 */
public class AgentDecorator implements MethodInterceptor {

    @Override
    public Object invoke(MethodInvocation invocation) throws Throwable {
        System.out.print("James");

        Object proceed = invocation.proceed();
        System.out.println((int)proceed);
        System.out.print("!");
        return proceed;
    }
}
